﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO;
using System.Xml.Serialization;
using MoviTiendas.Logica;
using System.IO.IsolatedStorage;



namespace MoviTiendas.Persistencia
{
    public static class Persistencia
    {
      
        static public void serializarCliente(Cliente cliente)
        {

            IsolatedStorageSettings myStore = IsolatedStorageSettings.ApplicationSettings;
            myStore["Cliente"] = cliente;
            myStore.Save();
        }

        static public Cliente deserializarCliente()
        {
            IsolatedStorageSettings myStore = IsolatedStorageSettings.ApplicationSettings;
            Cliente cliente = null;
            if (myStore.Contains("Cliente"))
                cliente = (Cliente)myStore["Cliente"];

            return cliente;
           
        }
    }
}
